<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateHospitalsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('st_hospitals', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name', 64)->unique()->comment('医院名称');
            $table->string('pic',200)->nullable()->comment('医院图片');
            $table->text('introduction')->nullable()->comment('医院介绍');
            $table->unsignedTinyInteger('type')->default(1)->comment('医院类型,1西医，2中医，3中西医');
            $table->unsignedInteger('sort')->default(0)->comment('排序调整');
            $table->string('longitudelatitude', 32)->nullable()->comment('医院坐标,经纬度(116.440488,39.948574)');
            $table->unsignedInteger('updated_by')->default(0)->comment('最后修改人, 关联doctor表');
            $table->integer('province')->default(0)->comment('省份');
            $table->integer('city')->default(0)->comment('城市');
            $table->integer('county')->default(0)->comment('区县');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('st_hospitals');
    }
}
